Skip to content

Fix bulk_assign tests to not depend on removed member mutation#2064

Merged
mrobers1982 merged 1 commit into
developfrom
mrobers1982/fix-bulk-assign-tests
Jul 13, 2026
Merged

Fix bulk_assign tests to not depend on removed member mutation#2064
mrobers1982 merged 1 commit into
developfrom
mrobers1982/fix-bulk-assign-tests

Conversation

@mrobers1982

@mrobers1982 mrobers1982 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

test_bulk_assign_data_rows and test_bulk_assign_data_rows_with_allowed_statuses depended on the project_based_user fixture, which provisions an org member via the addMembersToOrganization mutation. That mutation was removed from the API in intelligence #11829 (a2bdf13f69, 2022-11-15), so the fixture has been erroring at setup ever since — invisible because the integration suite has been chronically red.

Fix

bulk_assign_data_rows is a live SDK feature; only its test setup was broken. There's no public-API way to create an assignable member without email-invite acceptance (organization.invite_user() returns a pending Invite, not a User with a usable uid). Since the test only needs a valid member uid, it now assigns to the current authenticated user via client.get_user(). This keeps the feature under test instead of deleting coverage.

  • Rewrote the two tests to use client.get_user() and dropped the project_based_user dependency.
  • test_bulk_assign_empty_list was already independent and unchanged.

Note

project_based_user remains (used only by test_user_management::test_member_management, which is already @skipped). Its broader cleanup / member-management rewrite is out of scope here.

Verification

  • Collects cleanly (3 tests), ruff format --check + ruff check clean (ruff 0.8.2, matching CI).
  • The self-assignment behavior can only be fully confirmed by the integration job against staging.

🤖 Generated with Claude Code


Note

Low Risk
Test-only change with no production SDK or API surface modifications.

Overview
Integration tests for bulk_assign_data_rows no longer use the project_based_user fixture, which relied on the removed addMembersToOrganization GraphQL mutation and failed at setup.

Both affected tests now take the client fixture and use client.get_user() as the assignee so they still exercise bulk assign with a valid member uid. test_bulk_assign_empty_list is unchanged.

Reviewed by Cursor Bugbot for commit b21eba0. Bugbot is set up for automated code reviews on this repo. Configure here.

test_bulk_assign_data_rows and test_bulk_assign_data_rows_with_allowed_statuses
relied on the project_based_user fixture, which creates an org member via the
addMembersToOrganization mutation. That mutation was removed from the API back
in intelligence #11829 (a2bdf13f69, 2022-11-15), so the fixture has been
erroring at setup ever since (masked by the chronically-red integration suite).

There is no public-API replacement that yields an assignable member without
email-invite acceptance (invite_user returns a pending Invite, not a User).
bulk_assign_data_rows only needs a valid member uid, so assign to the current
authenticated user (client.get_user()) instead. This keeps the live
bulk_assign_data_rows feature under test rather than dropping coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mrobers1982
mrobers1982 merged commit 8ca13bd into develop Jul 13, 2026
16 of 26 checks passed
@mrobers1982
mrobers1982 deleted the mrobers1982/fix-bulk-assign-tests branch July 13, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants